package cn.wsalix.shop.service;

import java.util.List;
import java.util.Observer;

import cn.anlaser.service.SimpleService;
import cn.wsalix.biz.entity.Category;
import cn.wsalix.biz.form.CategoryForm;
import cn.wsalix.shop.entity.Product;
import cn.wsalix.shop.entity.Shop;
import cn.wsalix.shop.form.ProductForm;
import cn.wsalix.shop.repository.ProductRepository;
import cn.wsalix.shop.type.ProductTypeEnum;

public interface ProductService extends
		SimpleService<ProductForm, ProductRepository, Product>,Observer {

	List<Product> findsByCatId(Long id);

	public Product getNew(ProductForm form);

	void brand(ProductForm form);

	void origin(ProductForm form);

	List<Product> findsByUnCatId(Long id);
	//
	/**
	 * @return
	 * 获取商品分类
	 */
	List<Category> findCatLst(CategoryForm queryForm);

	List<Product> findByShopId(Long shopId);
	
	public List<Product> findByTypeAndFkidAndCat(ProductTypeEnum productType,Shop shop,Long catId);

	List<Product> findByUnShopId(Long shopId, Long userId);

	public void ready(Long productId);

	/**
	 * @param shopId
	 * @return 客服审核，通过商品发布请求
	 */
	public Product pass(Long productId);
	/**
	 * @param shopId
	 * @return 客服审核，通过商品发布请求
	 */
	public Product unPass(ProductForm form);
	
	//void onsell(ProductForm form);

	void undercar(ProductForm form);
}
